package com.situ.day4;

import org.junit.Test;

public class Demo {
	public static void main(String[] args) {
		Student student = new Student();
		//student.id = 3444;
		student.setId(1);
		
		Student stu = new Student(2, "lisi", 20, "UI");
		
		char c4 = 97;  
	}
	
	@Test
	public void test2() {
		int num = 4;
		// int 类型最大值
		System.out.println(Integer.MAX_VALUE);
		
		//自动拆箱和装箱
		//Integer integer = new Integer(4);
		Integer integer = 4;//自动装箱，隐藏做了 new Integer(4)
		int i = integer.intValue();
		int j = integer;
		integer = integer + 2;//自动拆箱 intValue.intValue()
		// intValue.intValue()+2=6
		//得到int类型的6又赋值给Integer类型，自动装箱
		System.out.println(integer);
	}
	
	@Test
	public void test44() {
		// 12   "12"
		String str = 12 + "";
		System.out.println(str);
		String str1 = Integer.toString(3);
		String str2 = Double.toString(3.14);
		
		int i = Integer.parseInt("3");
		double d = Double.parseDouble("3.14");
		// "true"
		boolean bool = Boolean.parseBoolean("true");
		System.out.println(i);
		System.out.println(d);
		System.out.println(bool);
		
		Integer integer = new Integer("3");
		System.out.println(integer);
		System.out.println(integer.intValue());
	}
	
	@Test
	public void test441() {
		Student student = new Student();
		System.out.println(student.getId());//0
		System.out.println(student.getName());//null
		student.setName("");
		System.out.println(student.getName());
		
	}
}
